
package com.jf.cloud.supplier.mapper;

import com.jf.cloud.supplier.dto.SupplierWithdrawCashDTO;
import com.jf.cloud.supplier.model.SupplierWithdrawCash;
import com.jf.cloud.supplier.vo.SupplierWithdrawCashLogExcelVO;
import com.jf.cloud.supplier.vo.SupplierWithdrawCashVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 供应商提现申请信息
 *
 * @author zz
 * @date 2022-03-14 17:04:32
 */
public interface SupplierWithdrawCashMapper {

    /**
     * 获取商家提现申请信息列表
     * @return 商家提现申请信息列表
     */
    List<SupplierWithdrawCash> list();

    /**
     * 根据商家提现申请信息id获取商家提现申请信息
     *
     * @param cashId 商家提现申请信息id
     * @return 商家提现申请信息
     */
    SupplierWithdrawCash getByCashId(@Param("cashId") Long cashId);

    /**
     * 保存商家提现申请信息
     * @param supplierWithdrawCash 商家提现申请信息
     */
    void save(@Param("supplierWithdrawCash") SupplierWithdrawCash supplierWithdrawCash);

    /**
     * 更新商家提现申请信息
     * @param supplierWithdrawCash 商家提现申请信息
     */
    void update(@Param("supplierWithdrawCash") SupplierWithdrawCash supplierWithdrawCash);

    /**
     * 根据商家提现申请信息id删除商家提现申请信息
     * @param cashId
     */
    void deleteById(@Param("cashId") Long cashId);

    /**
     * 根据银行卡id与商家提现申请状态获取商家提现申请数量
     * @param supplierBankCardId 银行卡id
     * @param status 提现申请状态
     * @return
     */
    int countBySupplierBandCardIdAndStatus(@Param("supplierBankCardId") Long supplierBankCardId, @Param("status") Integer status);

    /**
     * 根据参数获取提现记录列表
     * @param supplierWithdrawCashDTO 搜索筛选参数
     * @return 提现记录列表
     */
    List<SupplierWithdrawCashVO> listByParam(@Param("supplierWithdrawCash") SupplierWithdrawCashDTO supplierWithdrawCashDTO);
    List<SupplierWithdrawCashLogExcelVO> listSupplierWithdrawCashLogExcel(@Param("supplierWithdrawCash") SupplierWithdrawCashDTO supplierWithdrawCashDTO);
    /**
     * 根据id获取提现申请详情信息
     * @param cashId
     * @return
     */
    SupplierWithdrawCashVO getDetailByCashId(@Param("cashId") Long cashId);

    /**
     * 根据id与状态更新提现申请信息
     * @param supplierWithdrawCash
     * @param cashId
     * @param status
     * @return
     */
    int updateByIdAndStatus(@Param("supplierWithdrawCash") SupplierWithdrawCash supplierWithdrawCash, @Param("cashId") Long cashId, @Param("status") Integer status);

    int getWithdrawCashCount(@Param("startTimes") Date startTimes, @Param("endTimes") Date endTimes, @Param("supplierWithdrawCash") SupplierWithdrawCash supplierWithdrawCash);
}
